package com.sugon.dao;

import com.sugon.entity.ModuleSpDemandPlanEntity;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * 模具型芯需求计划Dao
 *
 * @author sugon
 * @date 2022-07-11 17:08:50
 */
public interface ModuleSpDemandPlanDao extends BaseDao<ModuleSpDemandPlanEntity> {

    /**
     * 批量删除指定需求月份所有的型芯采购计划
     *
     * @param demandMonth 需求月份
     * @return
     */
    @Delete("DELETE FROM module_sp_demand_plan WHERE demand_month = #{demandMonth}")
    int batchDeleteMoldSpPlan(@Param("demandMonth") String demandMonth);

    /**
     * 列表查询型芯制作计划和明细
     *
     * @param queryParam 查询参数
     * @return
     * @Param("queryParam") Map<String, Object> queryParam
     */
    List<ModuleSpDemandPlanEntity> listQuery(Map<String, Object> queryParam);

}
